package com.kl.service.aliyun.config;

/**
 * @author Yifan
 * @date 2017/11/14 15:03
 */
public enum SmsTempalteEnum {
    LOGIN(1,"注册","SMS_109710122"),
    CHANGEPASSWORD(2,"改密","SMS_109710121");

    SmsTempalteEnum(Integer index, String code, String msg){
        this.index = index;
        this.code = code;
        this.msg = msg;
    }

    public static SmsTempalteEnum fromTemplateName(String templateName){
        for (SmsTempalteEnum tempalte:SmsTempalteEnum.values()){
            if (tempalte.getCode().equals(templateName)){
                return tempalte;
            }
        }
        return null;
    }

    private Integer index;

    private String code;

    private String msg;

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
